home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Fatted Calf
/
The Fatted Calf.iso
/
Applications
/
Games
/
NeXTmj
/
Source
/
GameBoardView.m
< prev
next >
Wrap
Text File
|
1991-03-18
|
820b
|
56 lines
/* Generated by Interface Builder */
/*
*
$Author$
$Header$
*
$Log$
*/
#import "GameBoardView.h"
#import "GameInterface.h"
#import <appkit/graphics.h>
#import <dpsclient/psops.h>
#import <assert.h>
@implementation GameBoardView
- mouseDown:( NXEvent* )theEvent {
NXPoint clickPoint = theEvent->location;
[ self convertPoint:&clickPoint fromView:nil ];
if( theEvent->data.mouse.click == 1 )
[( GameInterface* )gameInterface click:&clickPoint ];
else
if( theEvent->data.mouse.click == 2 )
[( GameInterface* )gameInterface doubleClick:&clickPoint ];
return self;
}
- drawSelf:(const NXRect *)rects :(int)rectCount {
assert( gameInterface );
PSsetgray( NX_WHITE );
NXRectFillList( rects, rectCount );
[( GameInterface* )gameInterface gameBoardDraw ];
return self;
}
@end